<aside role="complementary" class="column column_right sidebar grid-4" id="sidebar-second-">
    <div class="section">
        <div class="region region-sidebar-second">
            <section class="block block-views block-odd" id="block-views-categories-block">
                <div class="block-title">
                    <h3>Assuntos relacionados</h3>
                </div>
                <?php
                $controller = new SiteController();
                $assuntos = null;
                if (!empty($id_menu_principal)) {
                    $assuntos = $controller->get_assuntos($id_menu_principal);
                }
                ?>
                <div class="content">
                    <div class="view view-categories view-id-categories view-display-id-block view-dom-id-1fe2a0e8bdb37125238d61e104b7b28a">
                        <div class="view-content">
                            <div class="item-list">    
                                <ul>          
                                    <?php if (!empty($assuntos)) { ?>
                                        <li class="views-row views-row-1 views-row-odd views-row-first">  
                                            <div><a href="<?php echo site_url('site/post/index/' . $assuntos[0]->get_id_menu()) ?>"><?php echo $assuntos[0]->get_titulo(); ?></a></div>
                                        </li>

                                        <?php
                                        for ($i = 1; $i < count($assuntos); $i++) {
                                            ?>
                                            <li class="views-row <?php echo $i % 2 == 0 ? 'views-row-odd' : 'views-row-even'; echo ' views-row-' . $i ?>">  
                                                <div><a href="<?php echo site_url('site/post/index/' . $assuntos[$i]->get_id_menu()) ?>"><?php echo $assuntos[$i]->get_titulo(); ?></a></div>
                                            </li>
                                        <?php
                                        }
                                    } else {
                                        ?>
                                        <li>  
                                            <div>Nenhum assunto encontrado</div>
                                        </li>    
                                        <?php
                                        
                                    }
                                    ?>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div><!-- /.content -->
            </section><!-- /.block -->
        </div>
    </div>
</aside>